package com.kawins.spring;

import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;

/**
 * @author rankai
 *         createTime 2018-02-2018/2/1 10:44
 */
public class SpringKit {

    private static final WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext();

    public static <T> T getBean(Class<T> clazz) {
        return context.getBean(clazz);
    }

}
